home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Form / Sources / Dialog.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.6 KB  |  134 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Dialog.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef DIALOG_H
  11. #define DIALOG_H
  12.  
  13. #ifndef FWFRAME_H
  14. #include "FWFrame.h"
  15. #endif
  16.  
  17. #ifndef FWEVENT_H
  18. #include "FWEvent.h"
  19. #endif
  20.  
  21. #ifndef FWDIALOG_H
  22. #include "FWDialog.h"
  23. #endif
  24.  
  25. #ifndef FWEDVIEW_H
  26. #include "FWEdView.h"
  27. #endif
  28.  
  29. #ifndef DEFINES_K
  30. #include "Defines.k"
  31. #endif
  32.  
  33. #if FW_PPOB_VIEWS
  34. #include "FWPPobOb.h"
  35. #endif
  36.  
  37. //==============================================================================
  38. // Forward Declarations
  39. //==============================================================================
  40.  
  41. class CFormPart;
  42. class CFormFrame;
  43.  
  44. //==============================================================================
  45. // class CPwdDialogFrame
  46. //==============================================================================
  47.  
  48. class CPwdDialogFrame : public FW_CDialogFrame
  49. {
  50.   public:
  51.     FW_DECLARE_AUTO(CPwdDialogFrame)
  52.  
  53.     CPwdDialogFrame(Environment* ev, 
  54.                 ODFrame* odFrame, 
  55.                 FW_CPresentation* presentation, 
  56.                 CFormPart* formPart);
  57.  
  58.     virtual ~CPwdDialogFrame();
  59.  
  60.   public:    
  61.     // ---- FW_CDialogFrame API
  62.     virtual void         HandleNotification(Environment* ev, const FW_CNotification& notification);
  63.  
  64.     // ----- FW_CView & FW_CFrame API
  65. #ifdef FW_BUILD_MAC
  66.     virtual void         FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
  67. #else
  68.     virtual void         Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
  69. #endif
  70. #if FW_PPOB_VIEWS
  71.     virtual void        CreateSubViews(Environment* ev);
  72. #endif
  73.     virtual void         PostCreateViewFromStream(Environment* ev);
  74.   
  75.     // -----New API
  76.     void                 Initialize(Environment* ev, CFormFrame* frame);
  77.     
  78.     // ----- Private data
  79.   private:
  80.       CFormFrame*         fFormFrame;  // pointer back to the main frame
  81. };
  82.  
  83. //==============================================================================
  84. // class CPwdEditView
  85. //==============================================================================
  86.  
  87. class CPwdEditView : public FW_CEditView
  88. {
  89.   public:
  90.     FW_DECLARE_CLASS
  91.     FW_DECLARE_AUTO(CPwdEditView)
  92.  
  93.     CPwdEditView(Environment* ev, 
  94.                 FW_CSuperView* container, 
  95.                 const FW_CRect& bounds,
  96.                 ODID  viewID);
  97.                 
  98.     CPwdEditView(Environment* ev); 
  99.     virtual ~CPwdEditView();
  100.     
  101.     // ----- FW_CEditView
  102.     virtual FW_Handled             DoMenu (Environment* ev, const FW_CMenuEvent& event);
  103.     virtual FW_Handled             DoCharKeyDown (Environment* ev, const FW_CCharKeyEvent & event);
  104.     FW_CString                    GetText (Environment * ev);
  105.     virtual void                 ActivateTarget (Environment * ev, FW_Boolean tabSelection);
  106.  
  107.     // ----- Archiving -----
  108. #if FW_ODFRC_VIEWS
  109.     static void*                Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  110.     static void                    Destroy(void* object, FW_ClassTypeConstant type);
  111.     virtual void                Flatten(Environment* ev, FW_CWritableStream& stream) const;
  112.     virtual void                InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  113. #endif
  114.  
  115.   private:
  116.     void                        Initialize(Environment* ev, FW_CSuperView* container, const FW_CRect& bounds);
  117.  
  118.   private:
  119.       FW_CEditView*     fShadowTEd;
  120. };
  121.  
  122. //========================================================================================
  123. // MetroWerks Constructor View Resource Reader
  124. //========================================================================================
  125. #if FW_PPOB_VIEWS
  126.  
  127. class FW_CPPobReader;
  128. void ReadPasswordEditView (Environment* ev, FW_CPPobReader* context, FW_CReadableStream& stream);
  129.  
  130. #endif // FW_PPOB_VIEWS
  131.  
  132. #endif
  133.  
  134.